package com.kingint.mbg.bas.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import java.util.Date;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableField;
import java.io.Serializable;
import java.util.List;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.kingint.mbg.dto.MemberReturn;
import com.kingint.mbg.group.Insert;
import com.kingint.mbg.group.Update;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import javax.validation.constraints.NotEmpty;

/**
 * <p>
 * 部门表
 * </p>
 *
 * @author wxh
 * @since 2020-12-21
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@ApiModel(value="BasDepartment对象", description="部门表")
public class BasDepartment implements Serializable {

    private static final long serialVersionUID = 1L;

    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    @ApiModelProperty(value = "名称")
    @TableField("name")
    @NotEmpty(groups = {Insert.class, Update.class},message = "部门名称不能为空")
    private String name;

    @ApiModelProperty(value = "描述")
    @TableField("description")
    private String description;

    @ApiModelProperty(value = "对应酒店id")
    @TableField("hotel_id")
    private Integer hotelId;

    @ApiModelProperty(value = "创建时间")
    @TableField("create_time")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
    private Date createTime;

    @ApiModelProperty(value = "状态（0，正常，1，删除）")
    @TableField("status")
    private Integer status;

    /**
     * 对应用户集合
     */
    @TableField(exist = false)
    private List<MemberReturn> memberReturns;


}
